package com.kehutong.payfees.dto;

import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;

import java.time.LocalDateTime;

/**
 * <pre>
 * 应用管理
 * </pre>
 * 
 * @author liuzhen (liuxing521a@163.com)
 * @createTime 2020年09月14日 上午9:43:38
 */
public class AppSetting extends KhtEntity {

	private static final long serialVersionUID = -70496797954415955L;

	protected AppSetting(String id) {
		super(id);
	}
	
	@Column(comment = "应用ID(自建应用、第三方应用)")
	private String appId;
	
	@Column(comment = "应用名称")
	private String appName;
	
	@Column(length = 64, comment = "应用secret(自建应用、第三方应用)")
	private String appSecret;
	
	@Column(comment = "是否第三方应用")
	private boolean thirdPart;

	@Column(comment = "应用事件接收token")
	private String token;
	
	@Column(length = 64, comment = "应用事件接收EncodingAESKey")
	private String encodingAESKey;
	
	@Column(length = 512, comment = "suiteTicket")
	private String suiteTicket;

	@Column(length = 512, comment = "应用accessToken")
	private String accessToken; // suiteAccessToken 应用suite_access_token

	@Column(comment = "应用accessToken过期时间")
	private LocalDateTime accessTokenExpiredTime;
	
	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getAppSecret() {
		return appSecret;
	}

	public void setAppSecret(String appSecret) {
		this.appSecret = appSecret;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getEncodingAESKey() {
		return encodingAESKey;
	}

	public void setEncodingAESKey(String encodingAESKey) {
		this.encodingAESKey = encodingAESKey;
	}

	public String getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}

	public LocalDateTime getAccessTokenExpiredTime() {
		return accessTokenExpiredTime;
	}

	public void setAccessTokenExpiredTime(LocalDateTime accessTokenExpiredTime) {
		this.accessTokenExpiredTime = accessTokenExpiredTime;
	}
	
	public String getSuiteTicket() {
		return suiteTicket;
	}

	public void setSuiteTicket(String suiteTicket) {
		this.suiteTicket = suiteTicket;
	}

	public boolean isThirdPart() {
		return thirdPart;
	}

	public void setThirdPart(boolean thirdPart) {
		this.thirdPart = thirdPart;
	}

	@Override
	public boolean valid(LocalDateTime localDateTime) {
		return super.valid(localDateTime);
	}
}
